1. Field of the Invention
The present invention relates in general to the field of database storage of information, and more particularly to an opportunistic database duplex operations.
2. Description of the Related Art
Redundancy for storage of information in a network cluster database is provided by duplexing information of a client for storage at a primary and a secondary database service. The pureScale database available from IBM has an application managed duplexing that writes a pureScale database structure from a client to two different database service provides. The client database application uses Remote Direct Memory Access (RDMA) to send and receive application data directly through a network interface with direct memory accesses that avoid delays introduced by operating system manipulation of data. One RDMA model issues a send/receive by a client to a server and another RDMA model uses server polling with a server responding to a request from a client pulling data from the client. For example, with one type of pureScale database, an appliance of a service provider node responds to a client request to modify the database structure by reading information to be written from the client node with RDMA and then transferring the information to the database service structure. The server and client interface may use standard socket protocols when transaction times are not critical.
Two conventional schemes exist for duplexing information in a database: “parallel write” duplexing and “store and forward” duplexing. Parallel write duplexing issues two write requests, one to each of two database services, so that the writes occur in parallel. Store and forward writes complete the write to the primary service and then use the primary service to write the secondary service. An advantage of parallel write duplexing is that a write in the parallel model finishes at about the same time for both database services that are receiving the information from the client. An advantage of store and forward writes is that duplexing does not depend upon all clients being able to reach the secondary service at all times. A difficulty with parallel write duplexing is that meta data between the two services must be synchronized if any issues arise during the processing of the information on either service, such as a failure to receive the data at a service because of a network failure. If the secondary service gets partitioned and not reachable by a single client, duplexing is lost and the secondary database structure must be re-built from the primary database structure. The status of a write to a database service and the duplexed state depend on both write streams. If one write fails and one succeeds, duplexing is broken and data redundancy fails until both service database structures are built. To rebuild the failed structure, a determination has to be made of whether the primary structure should remain as the primary to rebuild the secondary structure or the secondary structure should promote to be the primary structure to re-build the intended primary structure. A difficulty with store and forward duplexing is that write time doubles for a synchronous write, once to the primary service and once to the secondary service.